@props(['name', 'list'])
<div module class="index_news">
    <div class="wp">
        <div class="index_tit">
            <div class="left">
                <h4><em></em>{{ $name }}</h4>
                <span>{{__('messages.infos.introduce')}}</span>
            </div>
        </div>

        <div class="con">
            <div class="index_news_left">
                <div class="swiper-wrapper">
                    @foreach ($list as $d)
                    @if (!empty($d->image))
                    <div class="swiper-slide">
                        <a href="/article/{{$d->id}}">
                            <img src="{{$d->image}}" alt="{{$d->title}}">
                            <div class="txt">
                                <p>{{$d->title}}</p>
                            </div>
                        </a>
                    </div>
                    @endif
                    @endforeach
                </div>
                <div class="swiper-pagination"></div>
            </div>
            <div class="index_news_right">
                @foreach ($list as $d)
                <a href="/article/{{$d->id}}">
                    @if ($loop->first)
                    <div class="top">
                        <h4>
                            <span>{{$d->title}}</span>
                        </h4>
                        @if ($d->desc)
                        <p>{{$d->desc}}</p>
                        @endif
                    </div>
                    @else
                    <div class="item">
                        <p>{{$d->title}}</p>
                        <span>{{mb_substr($d->created_at, 0, 10)}}</span>
                    </div>
                    @endif
                </a>
                @endforeach
            </div>
        </div>
    </div>
</div>
<!-- end -->
